import request from '@/utils/request'

export function getAll() {
  return request({
    url: '/class_user/all',
    method: 'get'
  })
}

export function updateUserStatus(id, updatedUserStatus) {
  return request({
    url: '/class_user/updateUserStatus',
    method: 'put',
    params: {
      id: id,
      updatedUserStatus: updatedUserStatus
    }
  })
}

export function conditionSearch(search) {
  return request({
    url: '/class_user/mohu/condition/search',
    method: 'post',
    data: {
      id: search.phone,
      maxAge: search.maxAge,
      minAge: search.minAge,
      stuIdCard: search.idCard,
      stuUserName: search.username
    }
  })
}

export function mohuSearch(str) {
  return request({
    url: '/class_user/mohu/search',
    method: 'post',
    data: {
      str: str
    }
  })
}
